<!DOCTYPE html>
<html>

<head lang="en">
	<meta charset="UTF-8">
	<title>vue测试</title>
</head>

<body>
	<div id="app2">
		

		<p v-for="(item,idx) in num2">
			{{item}}
		</p>
		<button class="btn" @click="btnClick()">修改数据</button><br />

	</div>

	<script src="vue.js"></script>
	<script>
		var vm2 = new Vue({
			el: "#app2",
			data: {
				num: [18,19,20],
				num2: { a: 18,b:19,c:20 },
				items: [
					{ message: "Test one", id: "1" },
					{ message: "Test two", id: "2" },
					{ message: "Test three", id: "3" }
				],

			},
			methods: {
						btnClick(){
							console.log('测试');
						}
				}
		});

	</script>
</body>

</html>